﻿//
// Created by francklinson on 2021/3/21.
//

#include "move.h"


Move::Move(double a, double b)
{
    x = a;
    y = b;
}

void Move::showmove() const
{
    std::cout << "x: " << x << " y: " << y << std::endl;
}

Move &Move::add(const Move &m) const
{
    Move *pos = new Move;
    pos->x = this->x + m.x;
    pos->y = this->y + m.y;
    return *pos;
}

void Move::reset(double a, double b)
{
    x = a;
    y = b;
}

